Skip to main content

SqlMapper.StringTypeHandler<T>

Base-class for simple type-handlers that are based around strings

Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public abstract class StringTypeHandler<T> : SqlMapper.TypeHandler<T>, SqlMapper.ITypeHandler

Methods

Parse(String)

Parse a string into the expected type (the string will never be null)

View Source
Declaration
protected abstract T Parse(string xml)
Returns

<T>

Parameters
TypeNameDescription
System.StringxmlThe string to parse.

|

Format(T)

Format an instace into a string (the instance will never be null)

View Source
Declaration
protected abstract string Format(T xml)
Returns

System.String

Parameters
TypeNameDescription
<T>xmlThe string to format.

|

SetValue(IDbDataParameter, T)

Assign the value of a parameter before a command executes

View Source
Declaration
public override void SetValue(IDbDataParameter parameter, T value)
Parameters
TypeNameDescription
IDbDataParameterparameterThe parameter to configure

| | <T> | value | Parameter value

|

Parse(Object)

Parse a database value back to a typed value

View Source
Declaration
public override T Parse(object value)
Returns

<T>: The typed value

Parameters
TypeNameDescription
System.ObjectvalueThe value from the database

|

Implements